/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudm_SDM
 * Nudm Subscriber Data Management Service. � 2019, 3GPP Organizational Partners
 * (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.0.alpha-1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "DnnInfo.h"

namespace oai {
namespace udm {
namespace model {

DnnInfo::DnnInfo() {
  m_Dnn                      = "";
  m_DefaultDnnIndicator      = false;
  m_DefaultDnnIndicatorIsSet = false;
  m_LboRoamingAllowed        = false;
  m_LboRoamingAllowedIsSet   = false;
  m_IwkEpsInd                = false;
  m_IwkEpsIndIsSet           = false;
}

DnnInfo::~DnnInfo() {}

void DnnInfo::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json& j, const DnnInfo& o) {
  j        = nlohmann::json();
  j["dnn"] = o.m_Dnn;
  if (o.defaultDnnIndicatorIsSet())
    j["defaultDnnIndicator"] = o.m_DefaultDnnIndicator;
  if (o.lboRoamingAllowedIsSet())
    j["lboRoamingAllowed"] = o.m_LboRoamingAllowed;
  if (o.iwkEpsIndIsSet()) j["iwkEpsInd"] = o.m_IwkEpsInd;
}

void from_json(const nlohmann::json& j, DnnInfo& o) {
  j.at("dnn").get_to(o.m_Dnn);
  if (j.find("defaultDnnIndicator") != j.end()) {
    j.at("defaultDnnIndicator").get_to(o.m_DefaultDnnIndicator);
    o.m_DefaultDnnIndicatorIsSet = true;
  }
  if (j.find("lboRoamingAllowed") != j.end()) {
    j.at("lboRoamingAllowed").get_to(o.m_LboRoamingAllowed);
    o.m_LboRoamingAllowedIsSet = true;
  }
  if (j.find("iwkEpsInd") != j.end()) {
    j.at("iwkEpsInd").get_to(o.m_IwkEpsInd);
    o.m_IwkEpsIndIsSet = true;
  }
}

std::string DnnInfo::getDnn() const {
  return m_Dnn;
}
void DnnInfo::setDnn(std::string const& value) {
  m_Dnn = value;
}
bool DnnInfo::isDefaultDnnIndicator() const {
  return m_DefaultDnnIndicator;
}
void DnnInfo::setDefaultDnnIndicator(bool const value) {
  m_DefaultDnnIndicator      = value;
  m_DefaultDnnIndicatorIsSet = true;
}
bool DnnInfo::defaultDnnIndicatorIsSet() const {
  return m_DefaultDnnIndicatorIsSet;
}
void DnnInfo::unsetDefaultDnnIndicator() {
  m_DefaultDnnIndicatorIsSet = false;
}
bool DnnInfo::isLboRoamingAllowed() const {
  return m_LboRoamingAllowed;
}
void DnnInfo::setLboRoamingAllowed(bool const value) {
  m_LboRoamingAllowed      = value;
  m_LboRoamingAllowedIsSet = true;
}
bool DnnInfo::lboRoamingAllowedIsSet() const {
  return m_LboRoamingAllowedIsSet;
}
void DnnInfo::unsetLboRoamingAllowed() {
  m_LboRoamingAllowedIsSet = false;
}
bool DnnInfo::isIwkEpsInd() const {
  return m_IwkEpsInd;
}
void DnnInfo::setIwkEpsInd(bool const value) {
  m_IwkEpsInd      = value;
  m_IwkEpsIndIsSet = true;
}
bool DnnInfo::iwkEpsIndIsSet() const {
  return m_IwkEpsIndIsSet;
}
void DnnInfo::unsetIwkEpsInd() {
  m_IwkEpsIndIsSet = false;
}

}  // namespace model
}  // namespace udm
}  // namespace oai
